package activitys;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

/**
 * @author Glenn Vlekke
 */

public class GamewarsActivity extends Activity{
    /**
     *  Called when the activity is first created. 
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
                
        SharedPreferences pref = getSharedPreferences("programSettings",MODE_PRIVATE);   
        String userId = pref.getString("userId", "");
        if(userId.isEmpty())
        {
	        Intent registerActivity = new Intent(this, RegisterActivity.class);
	        startActivity(registerActivity);
        }else
        {
        	startActivity(new Intent(this, BaseMapActivity.class));
        }
        
        finish();
    }
}